import java.util.Arrays;

public class TwoDimensionalArray_HomeWork03 {
    //3、静态初始化一维数组{10,20,11,35,6,89}，进行冒泡排序
    public static void main(String[] args) {
        int[] nums={10,20,11,35,6,89};
        int temp=0;
        /*Arrays.sort(nums);
        System.out.println(Arrays.toString(nums));*/
        for (int i = 0; i < nums.length-1; i++) {
            for (int j = i+1; j < nums.length; j++) {
                if (nums[i]>nums[j]){
                    temp=nums[i];
                    nums[i]=nums[j];
                    nums[j]=temp;
                }
            }
        }
        System.out.println("进行冒泡排序后的数组为:"+Arrays.toString(nums));
    }

}
